#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

class QListWidget;
class QStackedWidget;
class QPushButton;

// Forward declaration
class MyOrdersPanel;

class MainWindow : public QMainWindow
{
    Q_OBJECT
public:
    // We need the user ID as well now
    explicit MainWindow(const QString& username, int userId, int userType, QWidget *parent = nullptr);

signals:
    void logout();

private slots:
    void onThemeSwitch();
    void showMyOrders(); // Slot to show the 'My Orders' panel

private:
    QListWidget* navigationList;
    QStackedWidget* contentStack;
    QPushButton* btnTheme;
    QString currentUser;
    int currentUserId; // Store the user ID
    int currentType;
    MyOrdersPanel* myOrdersPanel = nullptr; // Pointer to the panel (optional, lazy loaded)
    void setupUI(); // Renamed from setupTabs
    void applyTheme(bool dark);
    bool isDarkTheme;
};

#endif // MAINWINDOW_H